import time


# def InputLst():
#     Num = 1
#     lst = []
#     while True:
#         print(f"\nInput the {Num} number(or 'quit').\n>>>",end="")
#         InputInt = input()
#         try:
#             if int(InputInt) > -1 and int(InputInt) < 10:
#                 lst.append(int(InputInt))
#                 Num += 1
#             else:
#                 print("\nThe number is > -1 and < 10")
#                 sleep(3)
#         except:
#             if InputInt == 'quit':
#                 print(lst)
#                 return lst
#             else:
#                 print("\nAgain, please.")
#                 time.sleep(3)

def Input():
    while True:
        print("A nummber pleae.\n>>>", end="")
        a = input()
        try:
            a = int(a)
            return a
        except:
            print("Again, please\n")

def MakeLst(num):
    Lst = []
    LastNum = str(num)[0]
    Re = 0
    for i in str(num):
        if LastNum == i:
            Re += 1
        else:
            Re = 1
            Lst.append([i, Re])
            if Re != 0 and Re != 1:
            Lst.append([i, Re])
        LastNum = i
        if Re == 1 or Re == 0:
            Lst.append(LastNum)
#         else:
#             Lst.append([i, Re])
    return Lst
            
            
def main():
    Number = Input()
    Lst = MakeLst(Number)
    print(Lst)


main()